import React from 'react';
import { Routes, Route, Link, useNavigate } from 'react-router-dom';
import DoctorProfilePage from './DoctorProfilePage';
import AppointmentPage from './doctor/AppointmentPage';
import './AdminDashboardPage.css'; // 使用相同的样式

const DoctorDashboardPage = () => {
    const navigate = useNavigate();

    return (
        <div className="admin-dashboard">
            <div className="sidebar">
                <h2>医生管理系统</h2>
                <ul>
                    <li>
                        <Link to="/doctor/profile">个人信息</Link>
                    </li>
                    <li>
                        <Link to="/doctor/appointments">预约列表</Link>
                    </li>
                </ul>
            </div>
            <div className="main-content">
                <Routes>
                    <Route path="profile" element={<DoctorProfilePage />} />
                    <Route path="appointments" element={<AppointmentPage />} />
                    <Route path="*" element={<DoctorProfilePage />} />
                </Routes>
            </div>
        </div>
    );
};

export default DoctorDashboardPage; 